package com.tianzhu.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


/**
 * The persistent class for the SHIPPINGADDRESS database table.
 * 
 */
@Entity
@Table(name="SHIPPINGADDRESS")
@NamedQuery(name="Shippingaddress.findAll", query="SELECT s FROM Shippingaddress s")
public class Shippingaddress implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SHIPPINGADDRESS_SHIPPINGADDRESSID_GENERATOR", sequenceName="SHIPPINGADDRESS_S")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SHIPPINGADDRESS_SHIPPINGADDRESSID_GENERATOR")
	@Column(unique=true, nullable=false, precision=38)
	private Long shippingaddressid;

	@Column(name="APARTMENTNUMBER")
	private String apartmentnumber;

	@Column(name="CITY")
	private String city;

	@Column(name="COUNTRY")
	private String country;

	
	@OneToOne
	@JoinColumn(name = "CUSTOMER")
	private Customer customer;

	@Column(name="STATE")
	private String state;

	@Column(name="STREETNAME")
	private String streetname;

	@Column(name="ZIPCODE")
	private String zipcode;

	public Shippingaddress() {
	}

	public Long getShippingaddressid() {
		return this.shippingaddressid;
	}

	public void setShippingaddressid(Long shippingaddressid) {
		this.shippingaddressid = shippingaddressid;
	}

	public String getApartmentnumber() {
		return this.apartmentnumber;
	}

	public void setApartmentnumber(String apartmentnumber) {
		this.apartmentnumber = apartmentnumber;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getStreetname() {
		return this.streetname;
	}

	public void setStreetname(String streetname) {
		this.streetname = streetname;
	}

	public String getZipcode() {
		return this.zipcode;
	}

	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}

}